import os,zipfile

if __name__=='__main__':
    bakdir=r'd:\bak'
    local=r'C:\htmls\media\html'
    for zf in os.listdir(bakdir):
        zippath=os.path.join(bakdir,zf)
        zip=zipfile.ZipFile(zippath,'r')
        for info in zip.infolist():
            fn=info.filename.replace('/','\\')
            delf=os.path.join(local,fn)
            if os.path.isfile(delf):
                os.remove(delf)
                print 'delete ',delf
            else:
                try:
                    os.rmdir(delf)
                except:
                    pass